ProductPriceBand
This table contains live trading bands, as advertised by the listing exchange, for futures markets with bands.
METADATA
Attribute | Value |
---|---|
Topic | 4440-product-status |
MLink Token | ClientLive |
Product | SRLive |
accessType | SELECT |
Table Definition
Field | Type | Key | Default Value | Comment |
---|---|---|---|---|
fkey_at | enum - AssetType | PRI | 'None' | |
fkey_ts | enum - TickerSrc | PRI | 'None' | |
fkey_tk | VARCHAR(12) | PRI | '' | |
fkey_yr | SMALLINT UNSIGNED | PRI | 0 | |
fkey_mn | TINYINT UNSIGNED | PRI | 0 | |
fkey_dy | TINYINT UNSIGNED | PRI | 0 | |
lowLimitPrice | DOUBLE | 0 | Low price limit 0 if not set | |
highLimitPrice | DOUBLE | 0 | high price limit 0 if not set | |
maxPriceVar | DOUBLE | 0 | Maximum price variation allowed distance from last best price bidask | |
timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' | time of last state update |
PRIMARY KEY DEFINITION (Unique)
Field | Sequence |
---|---|
fkey_tk | 1 |
fkey_yr | 2 |
fkey_mn | 3 |
fkey_dy | 4 |
fkey_at | 5 |
fkey_ts | 6 |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRLive`.`MsgProductPriceBand` (
`fkey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None',
`fkey_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None',
`fkey_tk` VARCHAR(12) NOT NULL DEFAULT '',
`fkey_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
`fkey_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`fkey_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`lowLimitPrice` DOUBLE NOT NULL DEFAULT 0 COMMENT 'Low price limit (0 if not set)',
`highLimitPrice` DOUBLE NOT NULL DEFAULT 0 COMMENT 'high price limit (0 if not set)',
`maxPriceVar` DOUBLE NOT NULL DEFAULT 0 COMMENT 'Maximum price variation allowed (distance from last best price (bid/ask))',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'time of last state update',
PRIMARY KEY USING HASH (`fkey_tk`,`fkey_yr`,`fkey_mn`,`fkey_dy`,`fkey_at`,`fkey_ts`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='This table contains live trading bands, as advertised by the listing exchange, for futures markets with bands.';
SELECT TABLE EXAMPLE QUERY
SELECT
`fkey_at`,
`fkey_ts`,
`fkey_tk`,
`fkey_yr`,
`fkey_mn`,
`fkey_dy`,
`lowLimitPrice`,
`highLimitPrice`,
`maxPriceVar`,
`timestamp`
FROM `SRLive`.`MsgProductPriceBand`
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`fkey_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`fkey_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`fkey_tk` = 'Example_fkey_tk'
AND
/* Replace with a SMALLINT UNSIGNED */
`fkey_yr` = 123
AND
/* Replace with a TINYINT UNSIGNED */
`fkey_mn` = 1
AND
/* Replace with a TINYINT UNSIGNED */
`fkey_dy` = 1;
Doc Columns Query
SELECT * FROM SRLive.doccolumns WHERE TABLE_NAME='ProductPriceBand' ORDER BY ordinal_position ASC;